package org.example.pack1022.util;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;
//默认情况下，未起名时，名字为dareUtil
@Component
public class DateUtil {
    public String getNowDate(){
        System.out.println("我是util的方法");
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return sdf.format(date);
    }
}
